const Router = require('koa-router')
//

const { create } = require('../../controller/v1/log')

const { createValidator } = require('../../middleware/validator/v1/log')

const { code2Id } = require('../../middleware/auth/code_2_id')

const PREFIX = '/v1/log'

const router = new Router({ prefix: PREFIX })

router.post('/create', code2Id, createValidator, create)

router.get('/ping', (ctx) => {
  ctx.body = 'pong'
})

module.exports = router
